﻿<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="Accounts.aspx.cs" Inherits="Accounts" Title="Ghasam Accounts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="title">
        <span class="pageTitle">حساب های داخلی</span>
    </div>
     <hr />
     <div>
        <asp:GridView ID="gvAccounts" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="sdsAccounts">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" Visible="false" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="AccountName" HeaderText="نام حساب" SortExpression="AccountName" />
                <asp:BoundField DataField="Description" HeaderText="توضیحات" SortExpression="Description" />
                <asp:TemplateField HeaderText="تراز">
                    <ItemTemplate>
                      <span style='direction:rtl;'>
                        <%# Mani.Common.UIHelper.FormatString(Eval("Balance"))  %>
                      </span>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
         <asp:SqlDataSource ID="sdsAccounts" runat="server" ConnectionString="<%$ ConnectionStrings:GhasamConnectionString %>"
             SelectCommand="SELECT * FROM [InternalAccounts]"></asp:SqlDataSource>
     </div>
     
     
     <div class="title">
        <span class="pageTitle">ایجاد حساب جدید</span>
    </div>
    
    <div>
        نام حساب
        <asp:TextBox ID="txtAccountName" runat="server" />
        <asp:RequiredFieldValidator ID="rfvAccountName" ControlToValidate="txtAccountName" ErrorMessage="*" runat="server" />
        
        <br />
        <br />
        توضیحات
        <asp:TextBox ID="txtDescription" Width="300" runat="server" />
        <asp:Button ID="btnCreate" Text="ایجاد" runat="server" OnClick="btnCreate_Click" />
    </div>
    
     
</asp:Content>

